<template>
  <div>
    <van-nav-bar title="通知公告"
                 left-arrow
                 @click-left="onClickLeft" />
    <notice-item></notice-item>
  </div>
</template>
<script>
import { reactive } from 'vue'
import { useRouter } from 'vue-router'
import NoticeItem from '@/components/common/NoticeItem.vue'
export default {
  setup () {
    const router = useRouter()
    const data = reactive({})
    function onClickLeft () {
      window.history.length > 1 ? router.go(-1) : router.push('/user')
    }
    return {
      data,
      onClickLeft
    }
  },
  components: { NoticeItem }
}
</script>
<style lang="scss" scoped>
.van-nav-bar {
  background-color: $theme-color1;
}
</style>
